<?php

class Core_Table_Model_File extends Database_Table_Row
{
	/**
	 * @return int
	 */
	function getId()
	{
		return $this -> file_id;
	}

	/**
	 * @return string
	 */
	function getUrl()
	{
		return Nuo::getApi('core/storage')->getUrl($this -> storage_id, $this -> path);
	}
	
	/**
	 * delete storage file in file system
	 * @return void
	 */
	protected function _postDelete()
	{
		Nuo::getApi('core/storage')->deleteFile($this -> storage_id, $this -> path);
	}

}
